<template>
  <a-modal
    title="操作"
    style="top: 20px;"
    :width="800"
    :footer="null"
    v-model="visible"
  >
    <a-card :bordered="false">
      <a-descriptions size="small" bordered :column="2">
        <a-descriptions-item label="操作模块" >{{ mdl.title }}/{{ mdl.operType }}</a-descriptions-item>
        <a-descriptions-item label="请求方式">{{ mdl.requestMethod }}</a-descriptions-item>
        <a-descriptions-item label="登陆信息" :span="2">{{ mdl.operName }}/{{ mdl.operIp }}/{{ mdl.operLocation }}</a-descriptions-item>
        <a-descriptions-item label="操作方法" :span="2">{{ mdl.method }}</a-descriptions-item>
        <a-descriptions-item label="请求地址">{{ mdl.operUrl }}</a-descriptions-item>
        <a-descriptions-item label="状态">{{ mdl.status===0?'成功':'失败' }}</a-descriptions-item>
        <a-descriptions-item label="参数" :span="2">
          <a-textarea :rows="15" v-model="mdl.operParam" disabled style="color:#000"/>
        </a-descriptions-item>
      </a-descriptions>
    </a-card>
  </a-modal>
</template>

<script>

export default {
  name: 'OperLogModal',
  components: {
  },
  props: {
    operTypeMap: {
      type: Object,
      required: true
    }
  },
  data () {
    return {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      visible: false,
      mdl: {}
    }
  },
  created () {
  },
  methods: {
    detail (record) {
      this.mdl = Object.assign({}, record)
      this.mdl.operType = this.operTypeMap[this.mdl.businessType].text
      this.visible = true
    }
  }
}
</script>

<style scoped>

</style>
